<section class="content-header" style="margin-top: 50px;">
    <!--<sn-breadcrumb datalist="crumbBaseData"></sn-breadcrumb>-->
</section>

<section class="content">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title h3-inline">
                <span>流水线名称：{{flow.flowName}}</span>
                <span style="margin-left:30px;">
                    归属项目：{{flow.sysName}}
                </span>
            </h3>
        </div>
        <div class="panel-heading">
            <h3 class="panel-title h3-inline">
                执行结果：</span><span style="margin-left:20px;">
                            <span ng-if="history.executeStatus==1">执行中</span>
                            <span ng-if="history.executeStatus==2">成功</span>
                            <span ng-if="history.executeStatus==4">失败</span>
                            <span ng-if="history.executeStatus==8">停止</span>
                        </span>
                <span style="margin-left:30px;">执行时间：</span><span style="margin-left:20px;">{{history.beginTime}}</span>
            </h3>
        </div>

        <div class="panel-body">
            <div class="oneLine" ng-repeat="oneProcess in nodeGroupList">
                <div class="linetop">
                    <div class="linetopleft">
                        <div class="topleft">{{$index+1}}</div>
                        <div class="topmiddle">
                            <div class="topmiddleStep text_process_overflow" title="{{oneProcess.groupName}}">{{oneProcess.groupName}}</div>
                            <div class="topmiddleNum" ng-show="oneProcess.flowNodeList.length>0"><span>{{oneProcess.flowNodeList.length}}</span>任务
                            </div>
                        </div>
                        <div class="topimg">
                            <!--未执行-->
                            <span class="fu fu-ellipsis" ng-show="oneProcess.executeStatus == 1"></span>
                            <!--成功-->
                            <span class="fu fu-check-circle stateCode2" ng-show="oneProcess.executeStatus == 2"></span>
                            <!--失败-->
                            <span class="fu fu-cross-circle stateCode2"
                                  ng-show="oneProcess.executeStatus == 4 || oneProcess.executeStatus == 8"></span>
                        </div>
                    </div>
                </div>
                <div class="linecontent">
                    <div class="listStyle">
                        <!--未执行-->
                        <span class="circleBig" ng-show="oneProcess.executeStatus == 1"></span>
                        <!--成功-->
                        <span class="fu fu-check-circle stateCode2"
                              ng-show="oneProcess.groupType==1 && oneProcess.executeStatus == 2"></span>
                        <!--失败-->
                        <span class="fu fu-cross-circle stateCode2" ng-show="oneProcess.executeStatus == 3"></span>
                        <span ng-show="oneProcess.groupType==1">任务列表</span>
                        <span ng-show="oneProcess.groupType==-1">流水线现有{{nodeGroupList.length}}个阶段</span>
                    </div>

                    <div class="listStyle" ng-repeat="oneList in oneProcess.flowNodeList">
                        <!--未执行-->
                        <div class="fa fa-circle-o" ng-show="!oneList.executeStatus"></div>
                        <!--执行中-->
                        <div class="fa fa-refresh fa-spin" ng-show="oneList.executeStatus == 1"></div>
                        <!--成功-->
                        <div class="fu fu-check-circle stateCode2" ng-show="oneList.executeStatus == 2"></div>
                        <!--失败-->
                        <div class="fu fu-cross-circle stateCode2"
                             ng-show="oneList.executeStatus == 4 || oneProcess.executeStatus == 8"></div>
                        <span class="text_overflow" title="{{oneList.taskAlias}}">{{oneList.taskAlias}}</span>
                        <a ng-show="oneList.executeStatus > 0" title="{{oneList.remark}}" ng-href="{{oneList.logUrl}}" target="{{oneList.id}}"
                           style="float: right"><i class="fa fa-info-circle"></i></a>
                    </div>

                    <div class="listStyle">
                        <progress ng-if="oneProcess.groupType==0" class="progress-bar-success" value="1"
                                  max="1"></progress>
                        <progress ng-if="oneProcess.groupType==1" class="progress-bar-success"
                                  value="{{oneProcess.finishNum}}" max="{{oneProcess.flowNodeList.length}}"></progress>
                        <progress ng-if="oneProcess.groupType==-1" class="progress-bar-success"
                                  value="{{oneProcess.finishNum}}" max="1"></progress>
                    </div>

                    <div class="listStyle" ng-if="oneProcess.groupType==1">
                        <span>任务总数：{{oneProcess.flowNodeList.length}}</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>